Skip to content

Conversation

@thomastechs
Copy link
Contributor

What changes were proposed in this pull request?

This Pull request is used for the fix SPARK-12941, creating a data type mapping to Oracle for the corresponding data type"Stringtype" from dataframe. This PR is for the master branch fix, where as another PR is already tested with the branch 1.4

How was the this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
This patch was tested using the Oracle docker .Created a new integration suite for the same.The oracle.jdbc jar was to be downloaded from the maven repository.Since there was no jdbc jar available in the maven repository, the jar was downloaded from oracle site manually and installed in the local; thus tested. So, for SparkQA test case run, the ojdbc jar might be manually placed in the local maven repository(com/oracle/ojdbc6/11.2.0.2.0) while Spark QA test run.

Added this new integration suite for creating the docker based test suite for the bug fix in SPARK-12941
Updated this pom.xml with the ojdbc jar related dependency to test the OracleIntegrationSuite related to SPARK-12941 bug fix
… suite addition

Updated DockerJDBCIntegrationSuite.scala with the time out interval, as it is required to be atleast 200 sec for Oracle instance to be up
Updated OracleDialect.scala for [SPARK-12941]  for the fix of adding a data type mapping to Oracle
…te addition

Updated  OracleIntegrationSuite.scala for [SPARK-12941]  with Oracle Docker test cases
@yhuai
Copy link
Contributor

yhuai commented Feb 22, 2016

ok to test

@yhuai
Copy link
Contributor

yhuai commented Feb 22, 2016

@thomastechs Thank you for the PR. Since the jar is not in maven repo and you have tested it locally, how about we ignore the test? Let's keep the test but just ignore it. Let's also comment how to run the test. What do you think?

@yhuai
Copy link
Contributor

yhuai commented Feb 22, 2016

ok to test

@SparkQA
Copy link

SparkQA commented Feb 22, 2016

Test build #51684 has finished for PR 11306 at commit bde06fa.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

…es and ignore test case

Updated the file with style check fixes and ignore test cases, as the ojdbc jar is not present in the maven.
@SparkQA
Copy link

SparkQA commented Feb 23, 2016

Test build #51717 has finished for PR 11306 at commit ca7ef4e.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@thomastechs
Copy link
Contributor Author

@yhuai Thanks for the comments. I have put the ignore instead of test. The steps for the testing would be as follows.

  1. Pull oracle 11g image - docker pull wnameless/oracle-xe-11g
  2. Start docker - sudo service docker start
  3. Download oracle 11g driver jar and put it in maven local repo. (com/oracle/ojdbc6/11.2.0.2.0/ojdbc6-11.2.0.2.0.jar)
  4. Run spark test - ./build/sbt "test-only org.apache.spark.sql.jdbc.OracleIntegrationSuite"

@SparkQA
Copy link

SparkQA commented Feb 23, 2016

Test build #51721 has finished for PR 11306 at commit 28a9e9f.

  • This patch fails build dependency tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@thomastechs
Copy link
Contributor Author

@yhuai The style checks have been passed. Currently the build fails because the maven dependency oracle jar is not available, as expected. Suppose, we comment the oracle jar dependency in the pom file, still the build might fail in the beforeAll step where it tries to create a connection to Oracle docker using the ojdbc jar(which is not present in SparkQA env). So what would you suggest to proceed?

<artifactId>ojdbc6</artifactId>
<version>11.2.0.2.0</version>
<scope>test</scope>
</dependency>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you comment out this dependency since it is not in maven repo?

Updating this pom.xml to comment the changes related oracle ojdbc jar dependency as the maven repository does not contain this.
@SparkQA
Copy link

SparkQA commented Feb 23, 2016

Test build #51741 has finished for PR 11306 at commit 87e3d7f.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Updated the OracleIntegrationSuite.scala with the doc and override method
@SparkQA
Copy link

SparkQA commented Feb 23, 2016

Test build #51762 has finished for PR 11306 at commit 250591d.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@thomastechs
Copy link
Contributor Author

jenkins test this please

@yhuai
Copy link
Contributor

yhuai commented Feb 23, 2016

test this please

1 similar comment
@yhuai
Copy link
Contributor

yhuai commented Feb 23, 2016

test this please

@SparkQA
Copy link

SparkQA commented Feb 23, 2016

Test build #51782 has finished for PR 11306 at commit d77d585.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

<version>11.2.0.2.0</version>
<scope>test</scope>
</dependency>
-->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add comment at here to explain why we comment out this dependency.


import org.apache.spark.sql.test.SharedSQLContext
import org.apache.spark.sql.types._
import org.apache.spark.tags.DockerTest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a newline after this line.

Updated OracleIntegrationSuite.scala for [SPARK-12941] for the edits in the comments section
Added comments on why the oracle dependency was commented out
@SparkQA
Copy link

SparkQA commented Feb 24, 2016

Test build #51837 has finished for PR 11306 at commit b3de7f4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

Updated DockerJDBCIntegrationSuite.scala- Reverted the timeout and interval parameter to 60 and 1. This would be required to be increased for Oracle based testing.
Updated the comments about the time interval change required in DockerJDBCIntegrationSuite.scala when testing with Oracle tests
@SparkQA
Copy link

SparkQA commented Feb 24, 2016

Test build #51849 has finished for PR 11306 at commit 3f0f3b8.

  • This patch fails SparkR unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jayadevanmurali
Copy link
Contributor

@SparkQA Seems to be the build failed due kmeans error. I think this is not related to this PR. Could you please check

@thomastechs
Copy link
Contributor Author

@yhuai @SparkQA Looks like the build failed due to some other unit test cases, not related to this PR
Could you please confirm?

@thomastechs
Copy link
Contributor Author

@yhuai Could you initiate a retest please?

@yhuai
Copy link
Contributor

yhuai commented Feb 25, 2016

test this please

@SparkQA
Copy link

SparkQA commented Feb 25, 2016

Test build #51918 has finished for PR 11306 at commit 3f0f3b8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

* repository.
*/
@DockerTest
class OracleIntegrationSuite extends DockerJDBCIntegrationSuite with SharedSQLContext {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we use Ignore tag to ignore the entire suite? So, we should not even try to connect to oracle.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nvm. Before will not be triggered since no test will run.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yhuai the beforeall method will not execute because there is no valid test inside this class(already put ignore on top of test).

@yhuai
Copy link
Contributor

yhuai commented Feb 26, 2016

Thanks. Merging to master.

@asfgit asfgit closed this in 8afe491 Feb 26, 2016
asfgit pushed a commit that referenced this pull request Feb 29, 2016
… string datatypes to Oracle VARCHAR datatype

## What changes were proposed in this pull request?

This Pull request is used for the fix SPARK-12941, creating a data type mapping to Oracle for the corresponding data type"Stringtype" from dataframe. This PR is for the master branch fix, where as another PR is already tested with the branch 1.4

## How was the this patch tested?

(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
This patch was tested using the Oracle docker .Created a new integration suite for the same.The oracle.jdbc jar was to be downloaded from the maven repository.Since there was no jdbc jar available in the maven repository, the jar was downloaded from oracle site manually and installed in the local; thus tested. So, for SparkQA test case run, the ojdbc jar might be manually placed in the local maven repository(com/oracle/ojdbc6/11.2.0.2.0) while Spark QA test run.

Author: thomastechs <thomas.sebastian@tcs.com>

Closes #11306 from thomastechs/master.

(cherry picked from commit 8afe491)
Signed-off-by: Yin Huai <yhuai@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants